import Vue from 'vue'
import VueRouter from 'vue-router'
//tabar导入
import Bookshelf from '../views/bookshelf/bookshelf.vue'
import Novel_details_page from '../views/bookshelf/Novel_details_page.vue'
import free from '../views/free/free.vue'
import List from '../views/List/List.vue'
import classification from '../views/classification/classification.vue'
import set_up from '../views/my/set_up.vue'
import logn from '../views/logn/logn.vue' //登录页
import register from '../views/register/register.vue' //注册

Vue.use(VueRouter)

const routes = [{
		path: '/',
		redirect: 'Bookshelf'
	},
	{ //书架
		path: '/Bookshelf',
		name: 'Bookshelf',
		component: Bookshelf,
		meta: {
			showTab: true //控制底部显示
		}
	},
	{ //书架详情页
		path: '/Bookshelf/Novel_details_page',
		name: 'Novel_details_page',
		component: Novel_details_page,
		meta: {
			showTab: false
		}
	},

	{ //免费
		path: '/free',
		name: 'free',
		component: free,
		meta: {
			showTab: true
		}

	},
	{ //榜单
		path: '/List',
		name: 'List',
		component: List,
		meta: {
			showTab: true
		}
	},
	{ //分类
		path: '/classification',
		name: 'classification',
		component: classification,
		meta: {
			showTab: true
		}
	},
	//设置
	{
		path: '/set_up',
		name: 'set_up',
		component: set_up,
		meta: {
			title: '设置',
			showTab: false //控制底部不显示
		}
	},
	//登录页
	{
		path: '/logn',
		name: 'logn',
		component: logn,
		meta: {
			title: '欢迎登录',
			showTab: false //控制底部不显示
		}
	},
	{
		path: '/register',
		name: 'register',
		component: register,
		meta: {
			title: '欢迎注册',
			showTab: false //控制底部不显示
		}
	},

]

const router = new VueRouter({
	routes
})

export default router
